import {http} from '@/http/index.js';

/**
 * 上传图片
 * @param {String} tmpPath 
 */
export function uploadImage(tmpPath) {
	// return http.upload('index.php/phone/Tool/uploadImage', [{name: 'image', file: tmpPath}], {type: 3});
	return http.upload('index.php/phone/Tool/uploadImage_cw', [{name: 'image', file: tmpPath}], {type: 3});
}

/**
 * 上传头像
 * @param {String} tmpPath 
 */
export function uploadAvatar(tmpPath) {
	// return http.upload('index.php/phone/Tool/uploadImage', [{name: 'image', file: tmpPath}], {type: 0});
	return http.upload('index.php/phone/Tool/uploadImage_cw', [{name: 'image', file: tmpPath}], {type: 0});
}